/**
 * Alipay.com Inc.
 * Copyright (c) 2004-2022 All Rights Reserved.
 */
package com.example.spider.provider.why10w.why10;

/**
 * @author lym
 */
public enum Why10CategoryEnum {

    maths("科学世界", "数理化"),
    tech("科学世界", "科技篇"),
    astronomy("科学世界", "天文篇"),
    geography("科学世界", "地理篇"),

    human("生物王国", "人体篇"),
    animal("生物王国", "动物篇"),
    plant("生物王国", "植物篇"),
    healthy("生物王国", "健康篇"),

    traffic("国际博览", "交通篇"),
    country("国际博览", "国家篇"),
    military("国际博览", "军事篇"),
    sport("国际博览", "体育篇"),

    culture("人文广场", "文化篇"),
    art("人文广场", "艺术篇"),
    history("人文广场", "历史篇"),

    ;
    private final String firstCategory;

    private final String secondCategory;

    Why10CategoryEnum(String firstCategory, String secondCategory) {
        this.firstCategory = firstCategory;
        this.secondCategory = secondCategory;
    }

    public static Why10CategoryEnum getBySecondCategory(String secondCategory) {
        for (Why10CategoryEnum value : values()) {
            if (value.getSecondCategory().contains(secondCategory)) {
                return value;
            }
        }
        return null;
    }

    /**
     * Getter method for property <tt>firstCategory</tt>.
     *
     * @return property value of firstCategory
     */
    public String getFirstCategory() {
        return firstCategory;
    }

    /**
     * Getter method for property <tt>secondCategory</tt>.
     *
     * @return property value of secondCategory
     */
    public String getSecondCategory() {
        return secondCategory;
    }

}